<%-- 
    Document   : transition
    Created on : Nov 14, 2012, 1:32:18 PM
    Author     : user1
--%>

<%@ taglib uri="/struts-tags" prefix="s" %>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/transition/transition.js"></script>
        <script type="text/javascript" src="${pageContext.request.contextPath}/Js/transition/demo.js"></script>

        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/estilo.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/stylSergio.css" />
        <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/transition/transition.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Transition</title>


    </head>
    <body onload="avisos();">
        <div style="position: fixed; top: 0; z-index: 1; left:9%;">
            <s:div cssClass="contenidoAzul">
                <jsp:include page="/jsp/encabezado.jsp" flush="true" />
            </s:div>
        </div>
        </br>
        </br>
        </br>
        </br>
        </br>
        
        <div id="ventanaPopup1">
            <a id="ventanaPopup1Cerrar">Close</a>

            <h1 align="center">Data Personal</h1>
            <s:form action="ActionvalidarNameP"  cssClass="continuos_div_form" >

                <s:select  list="personList"  name="person" onchange="validaNombre();" headerKey="0" headerValue="Personal"/> 
                <s:submit id="submitValidaP" method="AgregayValidaNamePersonalM" value="Add" cssClass="oculto" cssStyle="position:relative; left:-50% ; top:-50%" />     
            </s:form>   


            <s:form action="ActionvalidarNamePTList"  cssClass="continuos_div_form" >

                <s:textfield name="pb.name" value="" label="Name" size="10"  cssStyle="text-align:center; width:190px;" cssClass="texfieldFormat" />

                <s:textfield name="pb.bf" value="" label="BF"  size="0" cssStyle="text-align:center; width:180px;" />
                <s:textfield name="pb.email" value="" label="Email" size="10" cssStyle="text-align:center; width:180px;" />
                <s:textfield name="pb.phone" value="" label="Telephone" size="10" cssStyle="text-align:center; width:180px;" />

                <s:submit id="submitValidaPT" method="validaNamePersonalMExiste" value="Add" cssClass="" cssStyle="position:relative; left:-50% ; top:-50%" />
                <s:reset value="Clean" cssClass="button" cssStyle="position:relative; left:-50% ; top:20%;"/>        
            </s:form>       
        </div>
        <table border="0" align="center">
            <tr>
                <td>
                    <fieldset class="fsclientInfo">
                        <legend>Client Information</legend>
                        <table class="actually">
                            <tbody>
                                <tr>  
                                    <td>
                                        <s:textarea class="areaTexto" id="" name="" cols="25"  
                                            readonly="true" value="%{ClientInfo}" >
                                        </s:textarea>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </fieldset>
                </td>
                <td>
                    <fieldset class="fsifOwner">
                        <legend>If Owner Information</legend>
                        <table class="actually">
                            <tbody>
                                <tr>  
                                    <td>
                                        <s:textarea class="areaTexto" id="" name="" cols="25"  
                                                    readonly="true" value="%{CorreoIfOwnerInfo}" >
                                        </s:textarea>
                                    </td>
                                </tr>
                            </tbody>
                        </table>                                    
                    </fieldset>
                </td>
                <td>
                    <fieldset class="fstransitionStatus">
                    <legend>Transition Status</legend>
                    <div class="column2_client" style="position:relative; top: 33%; left: 19%;">
                        <s:form action="statusChange" theme="simple">
                            <table class="actuallySp" >
                                <s:select align ="center" list="statusList" name="status"  
                                          headerKey="0" headerValue="%{statusselected}" theme="simple">

                                </s:select>
                            </table>
                            <s:submit align ="center" value="Save" method="insertStatus" theme="simple"/>
                        </s:form>
                    </div>
                </fieldset>
                </td>
            </tr>
            <tr>
                <td>
                    <div align="left">
                        <fieldset  class="fieldSet">
                            <legend>Branch</legend>
                            <s:form action="statusChange" theme="simple">
                                <s:select list="branch" headerKey="-1" headerValue="Branch"
                                      id="branch" theme="simple" label="Branch" name="locality"
                                      listValue="%{nombre}" listKey="%{nombre}" >
                                </s:select>
                                <s:hidden name="knkey" value="%{knkey}" />
                                <s:submit value="Confirm" method="locality" theme="simple"/>
                            </s:form>

                            <s:if test="valBranch == true">
                                <s:label value="%{msjBranch}" cssClass="successAction" theme="simple"/>
                            </s:if>
                        </fieldset>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                    <fieldset id="fsoperationsInfo"> 
                        <legend>Operations Information</legend>
                        <s:form  id="opinfo" method="post" name="opinfo" theme="simple">
                            <table style="width: 96%; margin-top: 3px; margin-left: 1px;" rules="all" class="listado2">
                                <thead>
                                    <tr>         
                                        <th style="width: 27px"><s:text name="ID" /></th>
                                        <th style="width: 27px"><s:text name="BF" /></th>
                                        <th style="width: 27px"><s:text name="Name" /></th>
                                        <th style="width: 27px"><s:text name="Email" /></th>
                                        <th style="width: 27px"><s:text name="Telephone" /></th>
                                        <th style="width: 27px"><s:text name="Delete" /></th>
                                    </tr>
                                </thead>                              
                                <tbody>
                                    <s:iterator var="opinfo" value="detallesPersonD"  status="rowstatus"> 
                                        <tr>
                                            <td><s:property value="id" /></td>
                                            <td><s:property value="bf" /></td>
                                            <td><s:property value="name" /></td>
                                            <td><s:property value="email" /></td>
                                            <td><s:property value="phone" /></td>
                                            <td>
                                                <s:a action="EliminaPTList"  cssClass="botonLink" method="EliminarListaDetallesPersonD"  >
                                                    <s:text name="Eliminar" />
                                                    <s:param value="id" name="detallesPersonD[%{#rowstatus.index}].id"/>                                           
                                                    <s:param value="%{#rowstatus.index}" name="index"/>                                           
                                                </s:a>
                                            </td>
                                        </tr>
                                    </s:iterator>
                                </tbody>                  
                            </table> 
                            <s:submit id="add"  type="button" value="Add" cssClass="botonLink"  onclick="return muestraPopupNew();" theme="simple"/>                             
                        </s:form>  
                    </fieldset> 
                </td>
            </tr>
            <tr>
                <td colspan="2" valign="top" align="center">
                    <fieldset style="width: 610px; height: 470px;">
                        <legend>Attachments</legend>
                        <center><b>Por favor seleccione solamente archivos .7z</b></center>
                        <br/>
                        <div class="checkBoxesLeft">
                            <s:form enctype="multipart/form-data" action="savevobo" id="downAttach" cssStyle="display:inline-table;" name="frmAttach" theme="simple">
                                <table style="position: relative;display: inline-table;" border="0" >
                                    <tr>
                                        <td align="left">
                                            Customer Profile:
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile1" name="archivo1" accept="text/*" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe1==true">
                                                <label class="errorAction" id="file1">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            RFC:
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile2" name="archivo2" accept="text/*" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe2==true">
                                                <label class="errorAction" id="file2">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            <label>R1:</label>  
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile3" name="archivo3" accept="text/*" />
                                        </td>  
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe3==true">
                                                <label class="errorAction" id="file3">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            R2:
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile4" name="archivo4" accept="text/*" />   
                                        </td>  
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe4==true">
                                                <label class="errorAction" id="file4">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            Minimum Selling Rates:
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile5" name="archivo5" accept="text/*" />
                                        </td >  
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe5==true">
                                                <label class="errorAction" id="file5">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            Rate Tracker:
                                        </td>
                                        <td align="left">
                                            <s:textfield id="ratetrackertextidform" name="transitionBean.ratetrackertext" cssClass="txtInputsFormatRO" size="4"/>
                                        </td>  
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            Sales Quotation:
                                        </td>
                                        <td align="left">
                                            <s:file id="idInputFile6" name="archivo6" accept="text/*" />
                                        </td>  
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <s:if test="existe6==true">
                                                <label class="errorAction" id="file6">Este archivo ya fue cargado</label>
                                            </s:if>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left">
                                            ACON Debtor Number:
                                        </td>
                                        <td align="left">
                                            <s:textfield id="acondebtornumbertextidform" name="transitionBean.acondebtornumbertext" cssClass="txtInputsFormatRO" size="4" />
                                        </td>  
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <s:submit type="button" class="toolbarButton" method="executeUpload" value="Upload Files"/>
                                        </td>
                                    </tr>
                                </table>                                    
                            </s:form>
                        </div>
                    </fieldset>
                </td>
                <td valign="top">
                    <fieldset style="width: 300px; height: 470px;">
                        <legend>Add Comment (Transition Log)</legend>
                        <s:form action="sendComment" method="post" id="sendComment" name="sendComment" cssClass="frmAddCommentLog" theme="simple">
                            <table>
                                <tr>
                                    <td>                               
                                        <s:textarea class="areaTexto" id="insert_comment" value="" 
                                                    name="transitionBean.Tlog"  cols="33" rows="23" theme="simple">
                                        </s:textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:submit type="button" class="" value="Send" method="insertComment" theme="simple"/>
                                    </td>
                                </tr>
                            </table>
                        </s:form>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td colspan="3" align="center">
                    <fieldset style="height: 700px; width: 950px">
                        <legend>Transition Log</legend>
                        <s:form action="downPdf" id="downPdf" name="downPdf" cssClass="frmPdf" theme="simple">
                            <table>
                                <tr> 
                                    <td>
                                        <s:textarea class="areaTexto" id="" name="TransitionBean.Tlog"  
                                                    cols="110" rows="37" readonly="true" value="%{datos}" theme="simple">
                                        </s:textarea>

                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="text-align: center;">
                                        <s:submit type="button" class="toolbarButton" method="GenerarReportePDF" value="Download to PDF" theme="simple"/>
                                    </td>
                                </tr>
                            </table>  
                        </s:form>
                    </fieldset> 
                </td>
            </tr>
        </table>
    </body>
</html>
